<ion-view view-title="订单明细" name="login-view">
  <ion-nav-bar class="item-customer-bg-darkred" align-title="center">
    <ion-nav-back-button class="button-clear">
      <i class="ion-arrow-left-c font_arrow"></i>
    </ion-nav-back-button>
  </ion-nav-bar>
  <ion-content>
    <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher>
    <div ng-switch on="params.hasOrder">

      <div ng-switch-when="0">
        <center>暂无订单</center>
      </div>
      <div ng-switch-when="1">
        <div ng-repeat=" item in params.orderData">
          <div class="card" >
            <div class="row">
              <div class="col col-15 ddcx-card-item-cust-left" ng-switch on="item.ORDER_TYPE" ng-class="{'ddcx-card-itembg-yellow':item.ORDER_TYPE=='10','ddcx-card-itembg-green':item.ORDER_TYPE=='11','ddcx-card-itembg-blue':item.ORDER_TYPE=='12'}">
                <div ng-switch-when="10">移网开户</div>
                <div ng-switch-when="11">缴费</div>
                <div ng-switch-when="12">资料返档</div>
              </div>
              <div class="col ddcx-card-item-cust-right" ng-switch on="item.ORDER_TYPE">
                <div ng-switch-when="10"> <!--移网开户-->
                  <div ng-switch on="(item.ORDER_STATUS =='9') && ((item.OPENED_STATUS=='1')||(item.OPENED_STATUS=='6'))">
                    <div ng-switch-when="true">
                      <div ng-click="doYWKHClick(item)">
                        <div class="ddcx-card-item-num">{{item.SERIAL_NUMBER}}</div>
                        <div class="ddcx-card-item-content">
                          {{item.PRODUCT_NAME}}<br/>
                          姓名：<u>{{item.CUST_NAME}}</u>&nbsp;&nbsp;开户状态：<u>{{item.OPENED_STATUS_NAME}}</u><br/>
                          写卡状态：<u>{{item.WRITE_STATUS_NAME}}</u><br/>
                          创建时间：<u>{{item.CREATE_TIME}}</u>
                        </div>
                      </div>
                    </div>
                    <div ng-switch-default >
                      <div class="ddcx-card-item-num">{{item.SERIAL_NUMBER}}</div>
                      <div class="ddcx-card-item-content">
                      {{item.PRODUCT_NAME}}<br/>
                      姓名：<u>{{item.CUST_NAME}}</u>&nbsp;&nbsp;开户状态：<u  on-hold="openywkh($event,item)">{{item.OPENED_STATUS_NAME}}</u><br/>
                      写卡状态：<u>{{item.WRITE_STATUS_NAME}}</u><br/>
                      创建时间：<u>{{item.CREATE_TIME}}</u>
                      </div>
                    </div>
                  </div>
                  <div ng-switch-default>
                    <div>
                      <div class="ddcx-card-item-num">{{item.SERIAL_NUMBER}}</div>
                      <div class="ddcx-card-item-content">
                        {{item.PRODUCT_NAME}}<br/>
                        {{item.OPENED_STATUS}}
                        姓名：<u>{{item.CUST_NAME}}</u>&nbsp;&nbsp;开户状态：<u>{{item.OPENED_STATUS_NAME}}</u><br/>
                        写卡状态：<u>{{item.WRITE_STATUS_NAME}}</u><br/>
                        创建时间：<u>{{item.CREATE_TIME}}</u>
                      </div>
                    </div>
                  </div>

                </div>
                <div ng-switch-when="11"><!--缴费-->
                  <div class="ddcx-card-item-num">{{item.SERIAL_NUMBER}}</div>
                  <div class="ddcx-card-item-content">
                    订单号：{{item.ORDER_ID}}<br/>
                    姓名：<u>{{item.CUST_NAME}}</u><u>{{item.PRODUCT_NAME}}</u><br/>
                    创建时间：{{item.CREATE_TIME}}<br/>
                    <div on-hold="openzhjffailreason($event,item.FAILURE_REASON)">
                      <div ng-switch-on=(!item.FAILURE_REASON)>
                        <div ng-switch-when="true">111</div>
                        <div ng-switch-when="false">333</div>
                        <div ng-switch-default>222</div>
                      </div>
                      {{(!item.FAILURE_REASON) && (( item.ORDER_STATUS=='0' ) && '未处理' || '处理成功') || '处理失败'}}
                    </div>
                  </div>
                </div>
                <div ng-switch-when="12"><!--返档-->
                  <div class="ddcx-card-item-num">{{item.SERIAL_NUMBER}}</div>
                  <div class="ddcx-card-item-content">
                    订单号：{{item.ORDER_ID}}<br/>
                    姓名：<u>{{item.CUST_NAME}}</u>&nbsp;&nbsp;&nbsp;&nbsp;<u>{{item.PRODUCT_NAME}}</u><br/>
                    创建时间：{{item.CREATE_TIME}}<br/>
                    {{!item.FAILURE_REASON && '' || item.FAILURE_REASON}}
                  </div>
                  <!--<div class="ddcx-card-item-num">{{item.SERIAL_NUMBER}}</div>-->
                  <!--<div class="ddcx-card-item-content">-->
                  <!--订单号：{{item.ORDER_ID}}<br/>-->
                  <!--姓名：<u>{{item.CUST_NAME}}</u>&nbsp;&nbsp;&nbsp;&nbsp;<u>{{item.PRODUCT_NAME}}</u><br/>-->
                  <!--创建时间：{{item.CREATE_TIME}}<br/>-->
                  <!--{{!item.FAILURE_REASON && '' || item.FAILURE_REASON}}-->

                  <!--</div>-->
                </div>
              </div>
              <!--0：未处理；1：处理完成；2：处理失败；3：已取消；9：处理中-->
              <div class="ddcx-ret" ng-switch on="item.ORDER_STATUS">
                <div ng-switch-when="0">
                  <img src="img/ddcx_noopear.png">
                </div>
                <div ng-switch-when="1">
                  <img src="img/ddcx_success.png">
                </div>
                <div ng-switch-when="2">
                  <img src="img/ddcx_failed.png">
                </div>
                <div ng-switch-when="9">
                  <img src="img/ddcx_loading.png">
                </div>
              </div>
            </div>
          </div>
          <!--<div class="card" >-->
          <!--<div class="row">-->
          <!--<div class="col col-15 ddcx-card-item-cust-left">2,3G 缴费</div>-->
          <!--<div class="col ddcx-card-item-cust-right">-->
          <!--<div class="ddcx-card-item-num">18551855717</div>-->
          <!--<div class="ddcx-card-item-content">缴费金额100元</div>-->
          <!--</div>-->
          <!--<div class="ddcx-ret"><img src="img/ddcx_failed.png"></div>-->
          <!--</div>-->
          <!--</div>-->
        </div>
      </div>
    </div>

    <ion-infinite-scroll ng-if="params.orderQueryParams.moreData" on-infinite="doLoadMore()" distance="5%" ></ion-infinite-scroll>
  </ion-content>
</ion-view>
<!--套餐详情浮动框-->
<script id="ywkhfailreason.html" type="text/ng-template">
  <ion-popover-view class="ywkh_pop" style="opacity: 0.5">
    <ion-header-bar class="pop_header">
      <p>失败原因</p>
    </ion-header-bar>
    <ion-content scrollbar-y="false" class="pop_content">
      <!--<div class="font_info2" style="text-align: left">套餐详情:</div>-->
      <div class="font_info2">
        <textarea class="step2_area">{{params.FAILURE_REASON}}</textarea>
      </div>
      <div class="cust_algin"><button class="button  bt_idcard" ng-click="closeywkh()">关闭</button></div>
    </ion-content>
  </ion-popover-view>
</script>
<!--套餐详情浮动框-->
<script id="openzhjffailreason.html" type="text/ng-template">
  <ion-popover-view class="ywkh_pop" style="opacity: 0.5">
    <ion-header-bar class="pop_header">
      <p>失败原因</p>
    </ion-header-bar>
    <ion-content scrollbar-y="false" class="pop_content">
      <!--<div class="font_info2" style="text-align: left">套餐详情:</div>-->
      <div class="font_info2">
        <textarea class="step2_area">{{params.FAILURE_REASON}}</textarea>
      </div>
      <div class="cust_algin"><button class="button  bt_idcard" ng-click="closetFAILURE_REASON()">关闭</button></div>
    </ion-content>
  </ion-popover-view>
</script>

